<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/include.inc.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <%@include file="/WEB-INF/views/layout/base.ref.jsp" %>
</head>
<body>
<%@include file="/WEB-INF/views/login/home/toolbar.jsp" %>
<div class="mtcontent">
    <div class="mtheader">
        <shiro:hasPermission name="customsearchSetting:add">
            <a class="mtbtn one" href="#"
               onclick="hrefNew_OnClick('${ctx}/customsearch/customsearchsetting/edit?id=-1')"><span><i
                    class="mtfa mt-add"></i>添加</span></a>
        </shiro:hasPermission>
        <shiro:hasPermission name="customsearchSetting:del">
            <a class="mtbtn two" href="#" onclick="bootstrapDel_OnClick('${ctx}/customsearch/customsearchsetting/del')"
               title="确定要删除吗?"> <i class="mtfa mt-del"></i><span>删除</span></a>
        </shiro:hasPermission>
    </div>
    <div class="mtbody">
        <div class="space-4"></div>
        <form method="post" id="pagerForm" action="${ctx}/customsearch/customsearchsetting/list">
            <input type="hidden" name="ifSession" value="1"/> <input type="hidden" name="pageNum" value="1"/> <input
                type="hidden" name="pageSize" value="${vo.pageSize}"/> <input type="hidden" name="orderField"
                                                                              value="${param.orderField}"/> <input
                type="hidden" name="orderDirection" value="${param.orderDirection}"/>
            <div class="mtrow">
                <div class="mtcolall">
                    <label class="mtlabel-auto">名称：</label>
                    <input type="text" class="mtinput" name="arg" value="${vo.arg}"/>
                    <label class="mtlabel-auto marginleft">编码：</label>
                    <input type="text" class="mtinput" name="arg1" value="${vo.arg1}"/>
                    <label class="mtlabel-auto marginleft">sql语句：</label>
                    <input type="text" class="mtinput" name="arg2" value="${vo.arg2}"/>
                    <a class="mtbtn search marginleft" href="#" onclick="queryClick('pagerForm')"><i
                            class="mtfa mt-search"></i><span>查询</span></a>
                </div>
            </div>
        </form>

        <div class="space-4"></div>
        <table id="grid">
        </table>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
    $(function () {
        $('#grid').bootstrapTable({
            striped: true,                      //是否显示行间隔色
            pagination: true,                   //是否显示分页（*）
            sortable: true,                     //是否启用排序
            clickToSelect: true,                //是否启用点击选中行
            height: $(window).height() - 200,  //固定高度
            columns: [
                {title: '选择', field: 'check', checkbox: true, align: 'center', valign: 'middle'},
                {
                    title: '操作', field: 'id', checkbox: false, align: 'center', valign: 'middle', width: 80,
                    formatter: function (value, row, index) {
                        return '<a href="#" onclick="hrefNew_OnClick(\'${ctx}/customsearch/customsearchsetting/edit?id=' + value + '\')"><i class="mtfa mt-pen mtblue mtpointer"></i></a>';
                    }
                },
                {title: '名称', field: 'selectName', align: 'center', valign: 'middle', sortable: true},
                {title: '编码', field: 'selectCode', align: 'center', valign: 'middle', sortable: true},
                {title: '选择类型', field: 'selectType', align: 'center', valign: 'middle', sortable: true},
                {title: '弹框类型', field: 'bouncedType', align: 'center', valign: 'middle', sortable: true},
                {title: 'SQL语句', field: 'sqlMapId', align: 'center', valign: 'middle', sortable: true}],
            data:${sysSelectlist}
        });
    });
</script>